package cn.net.zyx.service;

import cn.net.zyx.domain.Video;
import cn.net.zyx.service.fallback.VideoServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * description: VideoService <br>
 * date: 2021/5/11 16:04 <br>
 *
 * @author: ZhangYixin <br>
 * version: 1.0 <br>
 */
@FeignClient(value = "cloud-video-service",fallback = VideoServiceFallback.class)
public interface VideoService {

    @GetMapping("/api/v1/video/find_by_id")
    Video findById(@RequestParam("videoId") int videoId);

    @PostMapping("/api/v1/video/save")
    int save(@RequestBody Video video);
}
